From: Carlos Garnacho Date: Thu, 26 Oct 2023 14:04:46 +0000 (+0200) Subject: networkAgent: Fetch environment from launch context before spawn_async() X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~281^2~2^2~323 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a93465ed69f8e69e36428de3c559b60e329b51d8;p=gnome-shell.git networkAgent: Fetch environment from launch context before spawn_async() This will fetch the right environment for the launched application, without using GNOME Shell's environment. Part-of: --- diff --git a/js/ui/components/networkAgent.js b/js/ui/components/networkAgent.js index 6a4aa7747..3d187a878 100644 --- a/js/ui/components/networkAgent.js +++ b/js/ui/components/networkAgent.js @@ -455,11 +455,12 @@ class VPNRequestHandler extends Signals.EventEmitter { this._newStylePlugin = authHelper.externalUIMode; try { + const launchContext = global.create_app_launch_context(0, -1); let [success_, pid, stdin, stdout, stderr] = GLib.spawn_async_with_pipes( null, /* pwd */ argv, - null, /* envp */ + launchContext.get_environment(), GLib.SpawnFlags.DO_NOT_REAP_CHILD, () => { try {